package com.jk.controller;

import com.jk.dto.TbStudent;
import com.jk.interfaces.TbStudentServiceApi;
import com.jk.pojo.PagedResponse;
import com.jk.pojo.ResponseResult;
import com.jk.service.TbStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author yzf
 * @version 1.0
 * @description: TODO
 * @date 2024/12/9 19:29
 */
@RestController
public class TbStudentController implements TbStudentServiceApi {
    @Autowired
    private TbStudentService tbStudentService;
    @Override
    public PagedResponse<TbStudent> findTbStudentList(TbStudent tbStudent, Integer pageNum, Integer pageSize) {
        return tbStudentService.findTbStudentList(tbStudent, pageNum, pageSize);
    }

    @Override
    public void addStudent(TbStudent tbStudent) {
        tbStudentService.addStudent(tbStudent);
    }

    @Override
    public void deleteStudentById(Integer id) {
        tbStudentService.deleteStudentById(id);
    }

    @Override
    public TbStudent getStudentById(Integer id) {
        return tbStudentService.getStudentById(id);
    }

    @Override
    public void upStudent(TbStudent tbStudent) {
        tbStudentService.upStudent(tbStudent);
    }

    @Override
    public void upstatus(TbStudent tbStudent) {
        tbStudentService.upstatus(tbStudent);
    }

    @Override
    public void updatestatus(TbStudent tbStudent) {
        tbStudentService.updatestatus(tbStudent);
    }

    @Override
    public List<TbStudent> findTbStudent() {
        return tbStudentService.findTbStudent();
    }

    @Override
    public TbStudent findStudentByUserName(String userName) {
        return tbStudentService.findStudentByUserName(userName);
    }
}
